//
//  PersonalCenterTableViewController.m
//  EarnCommision
//
//  Created by EvanZ on 15/3/25.
//  Copyright (c) 2015年 EC. All rights reserved.
//



#import "PersonalCenterTableViewController.h"
#import "HTTPRequestOperationManager.h"


@implementation PersonalCenterTableViewController
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    
    UIBarButtonItem * leftButton = [[UIBarButtonItem alloc]initWithTitle:@"open" style:UIBarButtonItemStylePlain target:self action:@selector(openLeftDeck)];
    self.navigationItem.leftBarButtonItem = leftButton;
    
    [self categoryServlet];
}

- (void)categoryServlet{
    HTTPRequestOperationManager *manager = [HTTPRequestOperationManager manager];
    [manager categoryServletSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {
        NSArray * recipeArray = [[NSArray arrayWithObject:responseObject] firstObject];
        NSLog(@"categoryServlet>>>>>>>>SUCCESS: %@",recipeArray);
        
    }failure:^(AFHTTPRequestOperation *operation, NSError *error) {
        NSLog(@"categoryServlet>>>>>>>>Error: %@", error);
    }];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)openLeftDeck{
    [self.viewDeckController toggleLeftViewAnimated:YES];
}

@end

